LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := main

SDL_PATH := ../SDL
LUA_PATH := ../lua
CORSIXTH_PATH := .

LOCAL_C_INCLUDES := \
    $(LOCAL_PATH) \
    $(LOCAL_PATH)/$(SDL_PATH)/include \
    $(LOCAL_PATH)/$(LUA_PATH)/src \
    $(LOCAL_PATH)/$(CORSIXTH_PATH)/Src/ \
    $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcUnshared/ \
    $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcThirdParty/ \
    $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcThirdParty/agg/include/

LOCAL_SRC_FILES := \
    $(subst $(LOCAL_PATH)/,, \
    $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcUnshared/android_main.cpp \
    $(wildcard $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcUnshared/*.c) \
    $(wildcard $(LOCAL_PATH)/$(CORSIXTH_PATH)/Src/*.cpp) \
    $(wildcard $(LOCAL_PATH)/$(CORSIXTH_PATH)/Src/*.c) \
    $(wildcard $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcThirdParty/LFS/*.c) \
    $(wildcard $(LOCAL_PATH)/$(CORSIXTH_PATH)/SrcThirdParty/LPEG/*.c)) \
    $(CORSIXTH_PATH)/SrcThirdParty/agg/src/agg_image_filters.cpp \
    $(SDL_PATH)/src/main/android/SDL_android_main.cpp

LOCAL_SHARED_LIBRARIES := SDL lua
LOCAL_STATIC_LIBRARIES := 
LOCAL_LDLIBS := -lGLESv1_CM -llog

include $(BUILD_SHARED_LIBRARY)
